# 03-输出等边三角形.py
# def trangle(n):
#     a =10 # 局部变量
#     for line in range(n):
#         for count in range(n-line-1):
#             print(" ",end="")
#         for start in range(line+1):
#             print('☺',end=" ")
#         print()
# trangle(int(input('请输入打印几边形：')))

def print_triangle(n):
  for line in range(n):
    for count in range(n-line-1):
      print(" ",end="")
    for start in range(line+1):
      print("*",end=" ")
    print()
print_triangle(int(input('请输入打印几边形')))
